using System;
using System.Collections.Generic;
using System.Text;

namespace SharpMud.MudLib.NovaSMAUG.Environment
{
    // This struct/class needs alot of polishing. Just here for data loading right now

    public struct NumberRange<TLevel> where TLevel : IComparable<TLevel>
    {
        public TLevel low;
        public TLevel high;

        public NumberRange(TLevel l, TLevel h)
        {
            low = l;
            high = h;
        }

        public bool IsInRage(TLevel value)
        {
            if (low == null || high == null)
                throw new InvalidOperationException();

            if ((value.CompareTo(low) >= 0) && (value.CompareTo(high) <= 0))
                return true;
            else
                return false;
        }
    }
}